.TH syncsnoop 8  "2018-09-06" "USER COMMANDS"
.SH NAME
syncsnoop.bt \- Trace the sync() variety of syscalls. Uses bpftrace/eBPF.
.SH SYNOPSIS
.B syncsnoop.bt
.SH DESCRIPTION
syncsnoop traces calls to sync() syscalls (sync(), fsync(), msync(), etc), which
flushes file system cache and buffers to storage devices. These calls can cause
performance perturbations, and it can be useful to know if they are happening,
when they happen, and how frequently.

This works by tracing the sync() variety of syscalls via tracepoints.

This program is also a basic example of eBPF/bcc.

Since this uses BPF, only the root user can use this tool.
.SH REQUIREMENTS
CONFIG_BPF and bpftrace.
.SH EXAMPLES
.TP
Trace calls to sync() syscalls:
#
.B syncsnoop.bt
.SH FIELDS
.TP
TIME
A timestamp on the output, in "HH:MM:SS" format.
.TP
PID
The process ID that was on-CPU during the event.
.TP
COMM
The process name that was on-CPU during the event.
.TP
EVENT
The tracepoint name for the sync event.
.SH OVERHEAD
This traces sync syscalls and prints output for each event. As the
rate of this is generally expected to be low (<< 100/s), the overhead is also
expected to be negligible.
.SH SOURCE
This is from bpftrace.
.IP
https://github.com/iovisor/bpftrace
.PP
Also look in the bpftrace distribution for a companion _examples.txt file
containing example usage, output, and commentary for this tool.

This is a bpftrace version of the bcc tool of the same name.
.IP
https://github.com/iovisor/bcc
.SH OS
Linux
.SH STABILITY
Unstable - in development.
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
iostat(1)
